package com.wanmait.happyheating.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
* Created by Mybatis Generator 2021/05/10
*/
@Data
@TableName(value = "ordersinfo")
public class Ordersinfo implements Serializable {

    @TableField(exist = false)
    public Object userName;

    public Object getUserName() {
        return userName;
    }

    public void setUserName(Object userName) {
        this.userName = userName;
    }

    public Object getDateTime() {
        return dateTime;
    }

    public void setDateTime(Object dateTime) {
        this.dateTime = dateTime;
    }

    public Object getOrderTimeZone() {
        return orderTimeZone;
    }

    public void setOrderTimeZone(Object orderTimeZone) {
        this.orderTimeZone = orderTimeZone;
    }

    public Object getAddressInfo() {
        return addressInfo;
    }

    public void setAddressInfo(Object addressInfo) {
        this.addressInfo = addressInfo;
    }

    @TableField(exist = false)
    public Object dateTime;

    @TableField(exist = false)
    public Object orderTimeZone;

    @TableField(exist = false)
    public Object addressInfo;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField(exist = false)
    private List<MaterialsUse> materialsUses;
    /**
     * 用户ID
     */
    @TableField(value = "userinfo_id")
    private Integer userinfoId;
    @TableField(exist = false)
    private Userinfo userinfo;

    /**
     * 维修工人ID
     */
    @TableField(value = "workers_id")
    private Integer workersId;
    @TableField(exist = false)
    private Workers workers;

    /**
     * 供暖号码
     */
    @TableField(value = "heating_number")
    private String heatingNumber;

    /**
     * 联系人电话号码
     */
    @TableField(value = "phone")
    private String phone;

    /**
     *
     */
    @TableField(value = "fault_type_id")
    private Integer faultTypeId;
    @TableField(exist = false)
    private FaultType faultType;

    /**
     * 故障描述
     */
    @TableField(value = "fault_description")
    private String faultDescription;

    /**
     * 客户是否取消订单：1.未取消（只能在未上门前操作）
     */
    @TableField(value = "cancel")
    private Boolean cancel;

    /**
     * 下单时间
     */
    @TableField(value = "order_time")
    private Timestamp orderTime;

    /**
     * 付款时间
     */
    @TableField(value = "payment_time")
    private Timestamp paymentTime;

    /**
     * 预约时间段开始，如果是即时订单为null
     */
    @TableField(value = "appointment_start_time")
    private Timestamp appointmentStartTime;

    /**
     * 预约时间结束 如果是即时订单为null
     */
    @TableField(value = "appointment_end_time")
    private Timestamp appointmentEndTime;

    /**
     * 接单时间
     */
    @TableField(value = "take_time")
    private Timestamp takeTime;

    /**
     * 上门时间
     */
    @TableField(value = "visit_time")
    private Timestamp visitTime;

    /**
     * 到达确认照片
     */
    @TableField(value = "arrive_pictures")
    private String arrivePictures;

    /**
     * 完成时间
     */
    @TableField(value = "finish_time")
    private Timestamp finishTime;

    /**
     * 订单状态
     */
    @TableField(value = "state_id")
    private Integer stateId;
    @TableField(exist = false)
    private State state;

    /**
     * 记录维修时长/分钟
     */
    @TableField(value = "repair_time")
    private String repairTime;

    /**
     * 客户订单取消时间
     */
    @TableField(value = "cancellation_time")
    private Timestamp cancellationTime;

    /**
     * 地址
     */
    @TableField(value = "address_id")
    private Integer addressId;
    @TableField(exist = false)
    private Address address;
    /**
     * 供暖对象
     */
    @TableField(exist = false)
    private HeatingNumber heatingNumberObject;
    /**
     * 订单总价，订单未完成没有价格
     */
    @TableField(value = "orders_price")
    private Integer ordersPrice;

    /**
     * 人工费用
     */
    @TableField(value = "workers_price_id")
    private Integer workersPriceId;
    @TableField(exist = false)
    private WorkersPrice workersPrice;

    /**
     * 耗材总价
     */
    @TableField(value = "materials_price")
    private Integer materialsPrice;

    /**
     * 星级
     */
    @TableField(value = "star_rating")
    private Integer starRating;

    /**
     * 完成图片
     */
    @TableField(value = "success_picture")
    private String successPicture;

    @TableLogic
    @TableField(value = "enable")
    private Boolean enable;

    private static final long serialVersionUID = 1L;

    public static final String COL_USERINFO_ID = "userinfo_id";

    public static final String COL_WORKERS_ID = "workers_id";

    public static final String COL_HEATING_NUMBER = "heating_number";

    public static final String COL_PHONE = "phone";

    public static final String COL_FAULT_DESCRIPTION = "fault_description";

    public static final String COL_CANCEL = "cancel";

    public static final String COL_ORDER_TIME = "order_time";

    public static final String COL_PAYMENT_TIME = "payment_time";

    public static final String COL_APPOINTMENT_START_TIME = "appointment_start_time";

    public static final String COL_APPOINTMENT_END_TIME = "appointment_end_time";

    public static final String COL_TAKE_TIME = "take_time";

    public static final String COL_VISIT_TIME = "visit_time";

    public static final String COL_ARRIVE_PICTURES = "arrive_pictures";

    public static final String COL_FINISH_TIME = "finish_time";

    public static final String COL_STATE_ID = "state_id";

    public static final String COL_REPAIR_TIME = "repair_time";

    public static final String COL_CANCELLATION_TIME = "cancellation_time";

    public static final String COL_ADRESS_ID = "address_id";

    public static final String COL_ORDERS_PRICE = "orders_price";

    public static final String COL_WORKERS_PRICE_ID = "workers_price_id";

    public static final String COL_MATERIALS_PRICE = "materials_price";

    public static final String COL_STAR_RATING = "star_rating";

    public static final String COL_SUCCESS_PICTURE = "success_picture";

    public static final String COL_ENABLE = "enable";
}